// 导入 vue
import Vue from 'vue'
// 导入 vuex
import Vuex from 'vuex'
import cityList from '@/modules/store/citylist'
// vuex也是vue的插件, 需要use一下, 进行插件的安装初始化
Vue.use(Vuex)
// / 创建仓库 store
const store = new Vuex.Store({
  strict: true,
  state: {
    nowCity: { szm: '当前城市', city: ['上海'], id: 'AREA|dbf46d32-7e76-1196', index: '#' },
    nowXiaoqu: {},
    token: null
  },
  mutations: {
    updateData (state, data) {
      state.nowCity = data
    },
    updNowXiaoqu (state, data) {
      state.nowXiaoqu = data
    },
    upToken (state, data) {
      state.token = data
    }
  },
  actions: {

  },
  getters: {

  },
  modules: {
    CityList: cityList
  }
})
// 导出仓库
export default store
